{include file="common/header.tpl"}
{if $AppUI->id <= 0}
	{include file="index/login.tpl"}  
{else}
	{include file="common/menu.tpl"}
    <div class="rightColumn">
    	<div class="boxContent">
        	<div class="contentItem">
                <div class="contentItems">
                	<div class="headerTitle"><h2>Nội dung site tĩnh{if $AppUI->type > 1 && isset($smarty.session.content) && ($smarty.session.content&1<<0) > 0} &raquo; <a href="{$smarty.const.HOST_BACKEND}content/add">Thêm mới</a>{/if}</h2></div>                	
                    <form name="frmContent" id="frmContent" action="{$smarty.const.HOST_BACKEND}content/act" method="post" enctype="multipart/form-data">
                    	 <div class="secData">
                        	{if $arrResult}
                                <div class="secActionAndPage">
                                    <div class="actionLink">
                                    	&nbsp;
                                    </div>
                                    <div class="totalPage"><strong>Tổng số: {$intTotal}</strong></div>
                                </div>
                            {/if}
                            <table width="100%" cellpadding="0" cellspacing="0" border="0">
                                <thead>
                                    <tr>
                                       	<th class="firstChild" width="200">Trang</th>         
                                        <th>Nội dung</th>
                                        <th width="120">Ngày đăng</th>
                                        {if $arrResult} 
                                        	<th width="60">&nbsp;</th>
                                        {/if}
                                    </tr>
                                </thead>
                                <tbody>
                                    {if $arrResult}
                                        {foreach item=item from=$arrResult}
                                            <tr class="{cycle values="odd,even"}">
                                            	<td class="firstChild">{$item.name}</td>
                                                <td>{$item.content|strip_tags|truncate:500}</td>
                                                <td>{$item.postdate|date_format:"%d/%m/%Y %H:%M:%S"}</td>
                                                <td align="center">
                                                	{if ($smarty.session.content&1<<0)>0}
                                                        <a href="{$smarty.const.HOST_BACKEND}content/detail?contentid={$item.contentid}" title="Xem thông tin chi tiết">
                                                            <img src="{$smarty.const.HOST_STATICS}img/icon/ad-link.png" alt="Detail" border="0" width="16" height="16" />
                                                        </a>
                                                    {/if}
                                                    {if ($smarty.session.content&1<<2)>0}
                                                        <a href="{$smarty.const.HOST_BACKEND}content/edit?contentid={$item.contentid}" title="Cập nhật thông tin">
                                                            <img src="{$smarty.const.HOST_STATICS}img/icon/ad-edit.png" alt="Edit" border="0" width="16" height="16" />
                                                        </a>
                                                    {/if}
                                               	</td>
                                            </tr>
                                        {/foreach}
                                    {else}
                                    	<tr><td align="center" colspan="3">Không có dữ liệu</td></tr>
                                    {/if}
                                </tbody>
                            </table>
                            {if $arrResult}
                                <div class="secActionAndPage">
                                    <div class="actionLink">
                                    	&nbsp;
                                    </div>
                                    {paging total=$intTotal limit=$intLimit offset=$intOffset}
                                </div>
                            {/if}
                      	</div>
                   	</form>
                </div>
          	</div>
        </div>
    </div>
{/if}
{include file="common/footer.tpl"}
                
